#ifndef ENGINE_H_INCLUDED
#define ENGINE_H_INCLUDED

#include "SDL/SDL.h"
#include "SDL/SDL_opengl.h"
#include "SDL/SDL_mixer.h"

#include "stage.h"
#include "camera.h"
#include "player.h"
#include "Constants.h"

class Engine{
private:
	SDL_Surface *swScreen;

	GLuint screenTexture;			// This is a handle to our screen's texture object
	GLenum texture_format;
	GLint  nOfColors;

	int lastTime;
	Player *player;
	Stage *stage;
    SoundBoard* soundBoard;

	SDL_Event event;
	Mix_Chunk *dash;
	bool quit;
	void gather_input();
	void displayToGL();
	void init_GL();
	bool finished;

public:
    Engine();
    ~Engine();
    bool running();
    bool flip();
    void get_time();
    void framerate_limit();
    void check_events();
    void display();
    void update_objects();
};



#endif // ENGINE_H_INCLUDED
